import pygame
from pygame.locals import *
from sys import exit
from Carro import *


class EscolhaCarro:
    def __init__(self):
        pygame.init()
        self.screen = pygame.display.set_mode((800, 600))
        self.setCores()
        self.exibirNaJanela()

    def setCores(self):
        self.branco = (255, 255, 255)
        self.preto = (0, 0, 0)

    def exibirNaJanela(self):
##        posicionando =  ""
##        posicao = ""
##        
        
        while True:

            
            for event in pygame.event.get():
                if event.type == QUIT:
                    exit()
                elif event.type == MOUSEBUTTONDOWN:
                    posicaomouse = (pygame.mouse.get_pos())
                    posicaoatual  = posicaomouse
                    if int(posicaoatual[1]) > 300:                    
                        print  " teste maior"
                        imagem = "carro_teto_amarelo.gif"
                    elif int(posicaoatual[1]) < 300:
                        print  "teste menor"
                        imagem = "carro_teto_trans"
                        
                    
            self.screen.fill(self.branco)
            pygame.display.update()

janela = EscolhaCarro()
janela.exibirNaJanela()
